-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix selection of multiple users with validation templates #21262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix selection of multiple users with validation templates #21262
Conversation
templates/components/itilobject/timeline/form_validation.html.twig
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this issue may affect any dropdown, a global fix should be made to make the setValue handlers compatible with multiple values.
As I mentioned in the bug report, An array of data can be passed so it doesn't see the list of users as a single parameter. The You can see this yourself from the browser console: $(window).on('myevent', (e, test1, test2, test3) => { console.log({test1, test2, test3}) } $(window).trigger('myevent', ["value1", "value2", "value3"]);If you want to actually pass an array as a single value, it needs wrapped in another array: $(window).trigger('myevent', [["value1", "value2", "value3"]]); |
|
thanks @cconard96 but I finally used the ... operator to group all parameters in a single argument which is always an array (makes the received arguments consistent). |
eb10540 to
94618ec
Compare
94618ec to
f04985b
Compare
Checklist before requesting a review
Please delete options that are not relevant.
fix #21230